# loo2.S - input 2 characters in the terminal, and output it for 5 times
.section .data
bytevar:
	.rept 10
	.byte 0
	.endr
	.byte 13, 10
charbuf: 
	.byte 0, 0
.section .text
.globl _start
_start:
# input 2 characters
	movl $3, %eax
	movl $1, %ebx
	movl $charbuf, %ecx
	movl $2, %edx
	int $0x80
#repeat charbuf for 5 times
	movl $5, %ecx
	movl $bytevar, %ebx
	movw charbuf, %ax
L1:
	movb %al, (%ebx)
	movb %ah, 1(%ebx)
	addl $2, %ebx
	loop L1
# output
	movl $4, %eax
	movl $1, %ebx
	movl $bytevar, %ecx
	movl $12, %edx
	int $0x80
# exit
	movl $1, %eax
	movl $0, %ebx
	int $0x80
